<template>
	<view class="workbench-content">
		<view class="workbench-title">日常办公</view>
			<u-grid class="grid" :col="4" :border="false">
				<u-grid-item v-if="checkPermission(['sample_admin','chairman','system'])" :index="0" @click="navTo('/pages/sample/index')" > 
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">样品管理</view>
				</u-grid-item>
				<u-grid-item :index="0" @click="navTo('/pages/sample/my/index')" >
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">我的样品</view>
				</u-grid-item>
				<u-grid-item :index="0" @click="navTo('/pages/contract/index')" >
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">合同管理</view>
				</u-grid-item>
				<u-grid-item v-if="checkPermission(['officer','approver','chairman','centerLeader','inspector'])" :index="0" @click="navTo('/pages/task/index')" >
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">任务管理</view>
				</u-grid-item>
<!-- 				<u-grid-item :index="0" @click="navTo('/pages/task/index')" >
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">标准查询</view>
				</u-grid-item>
				<u-grid-item :index="0" @click="navTo('/pages/sample/my/index')" >
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">文件查询</view>
				</u-grid-item> -->
				<u-grid-item :index="0" @click="navTo('/pages/client/index')" >
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">客户管理</view>
				</u-grid-item>
				<u-grid-item :index="0" @click="navTo('/pages/device/index')" >
					<view class="home-icon icon-color04">
						<i class="iconfont icon-gongdan"></i>
					</view>
					<view class="grid-text">设备管理</view>
				</u-grid-item>
			</u-grid>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			navTo(url) {
				uni.navigateTo({
					url: url
				});
			}
		}
	}
</script>

<style lang="scss">
@import 'index.scss';

page {
		background-color: #f5f5f5;
	}

.banner-box{
	padding: 0 2%;
	width: 96%;
	height: 170rpx;
	margin: 30rpx 0 30rpx;
}
.u-swiper-wrap{
	padding:0 10px;
}
.banner-pic{
	width: 47%;
	float: left;
	display: inline-block;
	margin: 0 1.5%;
}
.banner-pic image{
	width: 100%;
	height: 170rpx;
	border-radius: 12rpx;
	box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}
.u-mode-light-info{
    background-color: #ffffff;
    color: #666666;
    border: 1px solid #e9ecf6;
	font-size: 12px;
	padding: 2px 8px;
	position: relative;
	top:-3px;
}
.workbench-title{
	font-size: 32rpx;
	font-weight: bold;
	color: #333333;
	padding: 15px 30rpx;
}
.home-icon {
    position: relative;
}
.icon-color04 {
    background-image: linear-gradient(0deg, #4f77ed, #4f77ed);
    border: 1px solid #4f77ed;
}
.home-icon {
    width: 48px;
    height: 48px;
    align-items: center;
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    color: #ffffff;
    font-size: 26px;
}
.iconfont{
	font-size: 22px;
}
.home-icon i.icon-tongzhi{
	font-size: 22px;
 }
</style>
